import threading

lock = threading.Lock()

def print_safe(message):
    with lock:
        print(message)
